import ajax from '@/api/ajax'

const { url } = require("../../build/config");

// console.log(config)

//  url.base_url;
const base_url = `${url.base_url}/api/kbase-file`


export function filePage(data) {
  return ajax({
    url: `${base_url}/page`,
    method: 'post',
    data: data
  })
}

export function fileInfo(id, version) {
 return ajax({
   url: `${base_url}/detail/${id}?${version ==null ? '' : "version=" + version}`,
   method: 'get',
 })
}

export function currentUserFilePage(data) {
 return ajax({
   url: `${base_url}/current/page`,
   method: 'get',
   data: data,
 })
}
